<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    822. Unique Morse Code Words
   </h1>
   <p>
    International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows:
    <code>
     "a"
    </code>
    maps to
    <code>
     ".-"
    </code>
    ,
    <code>
     "b"
    </code>
    maps to
    <code>
     "-..."
    </code>
    ,
    <code>
     "c"
    </code>
    maps to
    <code>
     "-.-."
    </code>
    , and so on.
   </p>
   <p>
    For convenience, the full table for the 26 letters of the English alphabet is given below:
   </p>
   <pre>
[".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."]</pre>
   <p>
    Now, given a list of words, each word can be written as a concatenation of the Morse code of each letter. For example, "cba" can be written as "-.-..--...", (which is the concatenation "-.-." + "-..." + ".-"). We'll call such a concatenation, the transformation&nbsp;of a word.
   </p>
   <p>
    Return the number of different transformations among all words we have.
   </p>
   <pre>
<strong>Example:</strong>
<strong>Input:</strong> words = ["gin", "zen", "gig", "msg"]
<strong>Output:</strong> 2
<strong>Explanation: </strong>
The transformation of each word is:
"gin" -&gt; "--...-."
"zen" -&gt; "--...-."
"gig" -&gt; "--...--."
"msg" -&gt; "--...--."

There are 2 different transformations, "--...-." and "--...--.".
</pre>
   <p>
    <strong>
     Note:
    </strong>
   </p>
   <ul>
    <li>
     The length of
     <code>
      words
     </code>
     will be at most
     <code>
      100
     </code>
     .
    </li>
    <li>
     Each
     <code>
      words[i]
     </code>
     will have length in range
     <code>
      [1, 12]
     </code>
     .
    </li>
    <li>
     <code>
      words[i]
     </code>
     will only consist of lowercase letters.
    </li>
   </ul>
  </div>
  <div>
   <h1 class="question_title">
    822. 唯一摩尔斯密码词
   </h1>
   <p>
    国际摩尔斯密码定义一种标准编码方式，将每个字母对应于一个由一系列点和短线组成的字符串，&nbsp;比如:
    <code>
     "a"
    </code>
    对应
    <code>
     ".-"
    </code>
    ,
    <code>
     "b"
    </code>
    对应
    <code>
     "-..."
    </code>
    ,
    <code>
     "c"
    </code>
    对应
    <code>
     "-.-."
    </code>
    , 等等。
   </p>
   <p>
    为了方便，所有26个英文字母对应摩尔斯密码表如下：
   </p>
   <pre>[".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."]</pre>
   <p>
    给定一个单词列表，每个单词可以写成每个字母对应摩尔斯密码的组合。例如，"cab" 可以写成 "-.-..--..."，(即 "-.-." + "-..." + ".-"字符串的结合)。我们将这样一个连接过程称作单词翻译。
   </p>
   <p>
    返回我们可以获得所有词不同单词翻译的数量。
   </p>
   <pre><strong>例如:</strong>
<strong>输入:</strong> words = ["gin", "zen", "gig", "msg"]
<strong>输出:</strong> 2
<strong>解释: </strong>
各单词翻译如下:
"gin" -&gt; "--...-."
"zen" -&gt; "--...-."
"gig" -&gt; "--...--."
"msg" -&gt; "--...--."

共有 2 种不同翻译, "--...-." 和 "--...--.".
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     注意:
    </strong>
   </p>
   <ul>
    <li>
     单词列表
     <code>
      words
     </code>
     &nbsp;的长度不会超过
     <code>
      100
     </code>
     。
    </li>
    <li>
     每个单词&nbsp;
     <code>
      words[i]
     </code>
     的长度范围为&nbsp;
     <code>
      [1, 12]
     </code>
     。
    </li>
    <li>
     每个单词&nbsp;
     <code>
      words[i]
     </code>
     只包含小写字母。
    </li>
   </ul>
  </div>
 </body>
</html>